//
// Created by parallels on 7/11/25.
//

#ifndef RANGEPARTITIONMATCHERDEMO_H
#define RANGEPARTITIONMATCHERDEMO_H
#include "RangePartitionMatcher.h"


class RangePartitionMatcherDemo: public RangePartitionMatcher<int> {
public:
    void initial(std::vector<RangePartition<int> > partitions)override;

    [[nodiscard]] std::vector<RangePartition<int> > getPartitions() const override;

    // [[nodiscard]] std::optional<std::string> findPartitionByValue(const int &value) const override;
    [[nodiscard]] std::string findPartitionByValue(const int &value) const override;

    [[nodiscard]] std::vector<std::string> findPartitionByRange(const int &rangeStart, const int &rangeEnd) const override;

    //二分查找
    [[nodiscard]] const std::string& BinSearch(const int& values) const override;
};

#endif //RANGEPARTITIONMATCHERDEMO_H
